Optimal. Leaf size=141 \[ -\frac {i}{32 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {i}{8 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {5 x}{32 a^3}+\frac {i a}{16 d (a+i a \tan (c+d x))^4}+\frac {i}{12 d (a+i a \tan (c+d x))^3}+\frac {3 i}{32 a d (a+i a \tan (c+d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3487, 44, 206} \[ -\frac {i}{32 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {i}{8 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {5 x}{32 a^3}+\frac {i a}{16 d (a+i a \tan (c+d x))^4}+\frac {i}{12 d (a+i a \tan (c+d x))^3}+\frac {3 i}{32 a d (a+i a \tan (c+d x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 206
Rule 3487
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=-\frac {\left (i a^3\right ) \operatorname {Subst}\left (\int \frac {1}{(a-x)^2 (a+x)^5} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^3\right ) \operatorname {Subst}\left (\int \left (\frac {1}{32 a^5 (a-x)^2}+\frac {1}{4 a^2 (a+x)^5}+\frac {1}{4 a^3 (a+x)^4}+\frac {3}{16 a^4 (a+x)^3}+\frac {1}{8 a^5 (a+x)^2}+\frac {5}{32 a^5 \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {i a}{16 d (a+i a \tan (c+d x))^4}+\frac {i}{12 d (a+i a \tan (c+d x))^3}+\frac {3 i}{32 a d (a+i a \tan (c+d x))^2}-\frac {i}{32 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {i}{8 d \left (a^3+i a^3 \tan (c+d x)\right )}-\frac {(5 i) \operatorname {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{32 a^2 d}\\ &=\frac {5 x}{32 a^3}+\frac {i a}{16 d (a+i a \tan (c+d x))^4}+\frac {i}{12 d (a+i a \tan (c+d x))^3}+\frac {3 i}{32 a d (a+i a \tan (c+d x))^2}-\frac {i}{32 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {i}{8 d \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.30, size = 115, normalized size = 0.82 \[ \frac {\sec ^3(c+d x) (-60 i \sin (c+d x)-120 d x \sin (3 (c+d x))+20 i \sin (3 (c+d x))+15 i \sin (5 (c+d x))-180 \cos (c+d x)+20 i (6 d x+i) \cos (3 (c+d x))+9 \cos (5 (c+d x)))}{768 a^3 d (\tan (c+d x)-i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 76, normalized size = 0.54 \[ \frac {{\left (120 \, d x e^{\left (8 i \, d x + 8 i \, c\right )} - 12 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 120 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 60 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 20 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{768 \, a^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.74, size = 119, normalized size = 0.84 \[ -\frac {-\frac {60 i \, \log \left (-i \, \tan \left (d x + c\right ) + 1\right )}{a^{3}} + \frac {60 i \, \log \left (-i \, \tan \left (d x + c\right ) - 1\right )}{a^{3}} - \frac {12 \, {\left (5 \, \tan \left (d x + c\right ) + 7 i\right )}}{a^{3} {\left (i \, \tan \left (d x + c\right ) - 1\right )}} + \frac {-125 i \, \tan \left (d x + c\right )^{4} - 596 \, \tan \left (d x + c\right )^{3} + 1110 i \, \tan \left (d x + c\right )^{2} + 996 \, \tan \left (d x + c\right ) - 405 i}{a^{3} {\left (\tan \left (d x + c\right ) - i\right )}^{4}}}{768 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.41, size = 137, normalized size = 0.97 \[ \frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{64 d \,a^{3}}+\frac {1}{32 a^{3} d \left (\tan \left (d x +c \right )+i\right )}-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{64 a^{3} d}+\frac {i}{16 a^{3} d \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {3 i}{32 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{12 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {1}{8 a^{3} d \left (\tan \left (d x +c \right )-i\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.68, size = 124, normalized size = 0.88 \[ \frac {5\,x}{32\,a^3}+\frac {\frac {1}{3\,a^3}+\frac {35\,{\mathrm {tan}\left (c+d\,x\right )}^2}{96\,a^3}-\frac {5\,{\mathrm {tan}\left (c+d\,x\right )}^4}{32\,a^3}+\frac {\mathrm {tan}\left (c+d\,x\right )\,5{}\mathrm {i}}{32\,a^3}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,15{}\mathrm {i}}{32\,a^3}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^5+{\mathrm {tan}\left (c+d\,x\right )}^4\,3{}\mathrm {i}+2\,{\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,2{}\mathrm {i}+3\,\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.49, size = 228, normalized size = 1.62 \[ \begin {cases} - \frac {\left (100663296 i a^{12} d^{4} e^{22 i c} e^{2 i d x} - 1006632960 i a^{12} d^{4} e^{18 i c} e^{- 2 i d x} - 503316480 i a^{12} d^{4} e^{16 i c} e^{- 4 i d x} - 167772160 i a^{12} d^{4} e^{14 i c} e^{- 6 i d x} - 25165824 i a^{12} d^{4} e^{12 i c} e^{- 8 i d x}\right ) e^{- 20 i c}}{6442450944 a^{15} d^{5}} & \text {for}\: 6442450944 a^{15} d^{5} e^{20 i c} \neq 0 \\x \left (\frac {\left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 8 i c}}{32 a^{3}} - \frac {5}{32 a^{3}}\right ) & \text {otherwise} \end {cases} + \frac {5 x}{32 a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________